Skip to content

Conversation

@keyboardDrummer
Copy link
Member

Description

Allow revealing using a static receiver

How has this been tested?

Added the test revealQualifiedId.dfy

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@keyboardDrummer keyboardDrummer marked this pull request as ready for review September 10, 2024 12:36
@keyboardDrummer keyboardDrummer enabled auto-merge (squash) September 10, 2024 12:38
Copy link
Member

@MikaelMayer MikaelMayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor comment for release notes.

resolver.ResolveNameSegment((NameSegment)effectiveExpr, true, null, resolutionContext, true);
} else {
resolver.ResolveDotSuffix((ExprDotName)effectiveExpr, true, null, resolutionContext, true);
resolver.ResolveDotSuffix((ExprDotName)effectiveExpr, true, true, null, resolutionContext, true);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These boolean flags are hard to review on GitHub, Non blocking for this one, but I would encourage in the future that we switch to enums when it's not obvious what a boolean is about. For example, StaticReferenceToInstance.Allowed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit conflicted on this. There's also a third option of adding the argument name, so it would say allowStaticReferenceToInstance: true. Possibly you could configure a linter to always require the argument name for booleans.

Co-authored-by: Mikaël Mayer <[email protected]>
Copy link
Member

@MikaelMayer MikaelMayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me !

@keyboardDrummer keyboardDrummer merged commit 7af458b into dafny-lang:master Sep 10, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants